#include "ThreadPool.hpp"
#include <time.h>

int main()
{
  srand((size_t)time(nullptr));
  ThreadPool* tp = new ThreadPool;
  tp->ThreadPoolInit();

  while (1){
    int x = rand()%10 + 1;
    int y = rand()%10 + 1;
    // 主线程一直塞任务
    sleep(1);
    tp->Put(new Task(x, y));
  } 
  return 0;
}
